Move Generation with Perfect Hash Functions

نویسندگان

  • Trevor I. Fenner
  • Mark Levene
چکیده

We present two new perfect hashing schemes that can be used for efficient bitboard move generation for sliding pieces in chess-like board games without the need to use rotated bitboards. Moreover, we show that simple variations of these schemes give minimal perfect hashing schemes. The new method is applicable provided N , the number of k-bit spaced positions that may be set to 1, is not more than k + 1. In chess, for a Rook’s movement along a file N = k = 8; for a Bishop’s movement N ≤ 8, and k = 9 for a north-east diagonal and k = 7 for a north-west diagonal. The results of computational experiments comparing the efficiency of move generation with the standard method show that using the hashing scheme gives an average improvement of approximately 40%. The schemes we suggest are simple, efficient, and easy to understand and implement.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

An Optimal Algorithm for Generating Minimal Perfect Hash Functions

A new algorithm for generating order preserving minimal perfect hash functions is presented. The algorithm is probabilistic, involving generation of random graphs. It uses expected linear time and requires a linear number words to represent the hash function, and thus is optimal up to constant factors. It runs very fast in practice.

متن کامل

A New Algorithm for Constructing Minimal Perfect Hash Functions

We present a three-step algorithm for generating minimal perfect hash functions which runs very fast in practice. The first step is probabilistic and involves the generation of random graphs. The second step determines the order in which hash values are assigned to keys. The third step assigns hash values to the keys. We give strong evidences that first step takes linear random time and the sec...

متن کامل

GPERF: A Perfect Hash Function Generator

gperf is a “software-tool generating-tool” designed to automate the generation of perfect hash functions. This paper describes the features, algorithms, and object-oriented design and implementation strategies incorporated in gperf. It also presents the results from an empirical comparison between gperf-generated recognizers and other popular techniques for reserved word lookup. gperf is distri...

متن کامل

On the Structure and Complexity of Infinite Sets with Minimal Perfect Hash Functions

This paper studies the class of infinite sets that have minimal perfect hash functions­ one-to-one onto maps between the sets and E·-computable in polynomial time. We show that all standard NP-complete sets have polynomial-time computable minimal per­ fect hash functions, and give a structural condition sufficient to ensure that all infinite NP sets have polynomial-time computable minimal perfe...

متن کامل

Finding Succinct Ordered Minimal Perfect Hash Functions

An ordered minimal perfect hash table is one in which no collisions occur among a prede ned set of keys, no space is unused and the data are placed in the table in order. A new method for creating ordered minimal perfect hash functions is presented. It creates hash functions with representation space requirements closer to the theoretical lower bound than previous methods. The method presented ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • ICGA Journal

دوره 31  شماره 

صفحات  -

تاریخ انتشار 2008